NpC  Numpad Control for FSX v2.21
Introduction

NOTE: Following the .pdf version of the ReadMe instructions is recommended as that version includes many illustrations that make configuring NpC much more clear.


Numpad Control (NpC) is a program (set of LUA scripts) for setting Com, Nav, ADF, Transponder (XPDR), OBS, Course, Airspeed and Autopilot values in FSX using the number pad of the keyboard instead of mouse click spots (we use FSX to represent both FSX and FSX:SE in this manual unless otherwise noted).  NpC, which is a revision and major expansion of the Numpad Radio program by dazz, includes a number of special features such as: 
* The ability to see each frequency digit as it is entered on a radios display  you do not have to wait until the full number is entered for the display to change
* The ability to set the autopilot (AP) altitude, vertical speed and heading
* The ability to set the auto-throttle airspeed in knots or MACH number
* The ability to set OBS1 and OBS2, or CRS1 (Course1) and CRS2 values
* The ability to work with a number of add-on aircraft (such as the PMDG 737NGX), in addition to most FSX default a/c, through an aircraft selection menu.
* The ability to work with both FSX and FSX:SE

Another feature of NpC is that the Title Bar -  the green bar that appears at the top* of the FSX screen,  displays the active device ( COM1, COM2, NAV1, NAV2, ADF, AP HDG, CRS1, etc.), while   frequencies and other entered values are realistically displayed directly in the display of the device whose settings are being changed (except OBS/CRS and autopilot values which appear after the last digit is entered).   


IT IS IMPORTANT TO NOTE that for aircraft whose radio stacks do not show a standby frequency (such as the stock FSX King Air and DC-3) you will not see the frequency as it is entered  AND, in order to see that frequency you MUST hit the Swap frequency key.  In general, however, you will see Com and Nav radio frequencies, transponder codes and ADF frequencies as they are entered.  Altitude entries will be seen on the autopilot display or on the PFD display but not until the entire (5-digit) entry has been made.

It should be noted that a great deal of credit goes to dazz (Dario Iriberri )   http://forum.avsim.net/topic/336131-tuning-the-fsx-radios-with-the-numpad-of-your-keyboard/.  The   scripts build on his original work as does this user manual.

Description

NpC is a program for entering Com, Nav and ADF radio frequencies, the Transponder code, VOR OBS/CRS settings, Auto-throttle airspeed, and Autopilot altitude, vertical speed, and heading values in FSX using the keyboard numberpad instead of mouse click spots.  A registered copy of FSUIPC4 is needed for NpC to work, and it's programmed primarily for aircraft with default FSX avionics (radios, transponders, and autopilots that were developed within standard FSX guidelines), and also for a number of third party add-on aircraft as identified below.  It may not work completely with other add-on aircraft, especially with regard to autopilots that have been programmed outside the FSX norm, although often radio settings, headings and course selections, will work.


*See Resizing and Repositioning the NpC Message Window for additional options.

NpC selection keys typically consist of:

* 1 aircraft selection key that is also used to turn on the NpC aircraft selection Menu.
* 7 keys to select the device to be updated (the active device) - COM1 & 2, NAV 1 & 2, ADF1 & 2, SQK (transponder), AP (AutoPilot Altitude, Vertical Speed and Heading, sequentially), IAS (auto-throttle Indicated Airspeed/Mach),  and OBS1/CRS1 & 2 settings.   NOTE:  There are options available for how the Nav radios, OBS1/OBS2, CRS1/CRS2, and Autopilot values are accessed.  See NpC Configuration Options, below.
* 11 numpad keys for the 0 - 9 digits and the decimal  point '.' dot
* 1 key to reset (restart) entering data, such as frequencies or OBS values, from the beginning.
* 1 key to back up one or more digits (backs up one digit (or decimal point) with each keypress) while entering values.
* 1 key to swap frequencies in the currently selected device where applicable (COM, NAV or ADF depending on active device).
* 2 keys to select positive or negative (up or down) vertical speed (VS) for the autopilot, respectively

Installation
Browse to your FSX or FSX:SE installation directory and open the Modules folder, the default FSX path is:
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules.  A commonly used alternative location is C:\FSX\Modules if FSX was installed in the root directory. A common path for FSX:SE is C:\Program Files (x86)\Steam\steamapps\common\FSX\Modules when both FSX and FSX:SE are installed side-by-side.  When only FSX:SE is installed on a computer the Modules folder use a path similar to the default FSX path (C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules).

Copy & unzip the contents of the NpC.zip file into the Modules folder.

You should now have 15 LUA script files (and this manual) in your Modules folder alongside all the FSUIPC4 stuff.  These files allow for NpC configuration as explained in the NpC Configuration Options section below.

Basic Script Set
Optional Scripts
* NpCkeyData.lua
* NpCsetADF.lua
* NpCsetCOM.lua
* NpCsetNAV.lua
* NpCsetSQK.lua
* NpCsetAP.lua
* NpCsetIAS.lua
* NpCsetOBS.lua
* NpCsetCherAP.lua
* NpCsetNAV&OBS.lua (combines NAV and OBS in a 4-way toggle: NAV1-OBS1-NAV2-OBS2)
* NpCsetNAV&CRS.lua (combines NAV and CRS in a 4-way toggle: NAV1-CRS1-NAV2-CRS2)
* NpCsetALT.lua (Allows a separate key to select Altitude input)
* NpCsetVS.lua (Allows a separate key to select Vert Speed input)
* NpCsetHDG.lua (Allows a separate key to select Heading input)
* NpCsetCRS.lua
* NpCsetNAVorGPS.lua (Toggles a/c navigation between Nav and GPS)










Start FSX (or FSX:SE). Select Add-ons -> FSUIPC in the menu bar to open the FSUIPC GUI:




Make sure the option "Hide all single line messages" is unticked in the "About" tab.  We will now assign the keystrokes in FSUIPC. Click on the "Key Presses" tab





Note Before You Begin

You will be selecting several keys on your keyboard that will allow you to have full use of NpC.  You must ensure that none of the keys you are going to use are assigned to any function in FSX or used to control other functions in add-ons or other applications. 



Configuration

Setting the Active Device Selection Keys

NOTE:  This section covers the Basic Script Set device configuration.  Optional Script configuration is done in the same way  and can be done in lieu of or in addition to configuring the Basic scripts.  See the section NpC Configuration Options for additional information.  Note that you can leave unused scripts in the Modules folder  they will not affect operation if there are no key assignments made that activate the scripts and their functions.

This example shows configuring the key for the COM radios.  See the screen views below the following steps - 

1. Click the Set button and press the key you want to use to select the COM radios.  The " C  key is used for this example, but you can pick whichever key you want, such as the Page Up key, as long as that key is not assigned to another FSX function or another Lua script.
2. Use the "Control sent when key pressed" dropdown menu and select "Lua NpCsetCOM" from the list.  That will assign the functionality to the keystroke (in this case, activation of the COM Lua script).  Hint  If you click the drop-down arrow and quickly type lua this will bring up the first of the Lua files, then just scroll to the one desired. Warning:  Often, especially after you have used NpC for a while, there are similar looking scripts that have been generated by FSUIPC, such as LuaClear NpCsetCOM.  Be careful to assign the correct script.
3. Enter 0 in the Parameter box (more discussion on this value later).
4. Press  Confirm and make sure that the configuration is mirrored to the fields on the right side of the FSUIPC panel.

Once you press "Confirm" and you can see the Key Press selection and the action control in the fields are correct, FSUIPC is ready to assign a new keystroke by pressing "Set" again, there's no need to close the GUI and restart the process.



Repeat the above process to assign the NAV selection key, the ADF selection key, the Transponder selection key, the Autopilot selection key, the Indicated AirSpeed selection key, and the Omni bearing selection key using each of the following in Step 2 for each key, respectively: 

NAV: "Lua NpCsetNAV" 
ADF: "Lua NpCsetADF" 
SQK: "Lua NpCsetSQK" 
AP: Lua NpCsetAP
IAS: Lua NpCsetIAS
OBS: LuaNpCsetOBS" 

Each key assigned through this process identifies a particular LUA script to be activated.  Once activated, the device associated with the function that key activates is ready to receive the data for that script to operate on.  A particular key can only be used to activate one script (device).  On the other hand, a particular script may be activated by more than one key. As you will see below, the NpCKeyData.lua script is "activated by many keys  those keys, operating through the NpCKeyData script provide the data that the selected device script receives.

Note that some functions, such as for the radios, have options for the parameter value.  For example, a 0 parameter means that for the Com radios the selected key will toggle between COM1 and COM2 (if you have and are using two). The same idea holds for the NAV and ADF radios.

So if, for example, you only have one Com radio or ADF or if you only want the script to activate one particular Com radio or ADF, then assigning the Lua NpCsetCOM control to a key with the associated parameter set to 1 will make the key work as a COM1 only selection (no toggle behavior).  In short:   

* Lua NpCsetCOM + parameter 0 = toggles selection COM1 - COM2 
* Lua NpCsetCOM + parameter 1 = COM1 only selection
* Lua NpCsetCOM + parameter 2 = COM2 only selection

* Lua NpCsetNAV + parameter 0 = toggles selection NAV1 - NAV2
* Lua NpCsetNAV + parameter 1 = NAV1 only selection
* Lua NpCsetNAV + parameter 2 = NAV2 only selection

* Lua NpCsetADF + parameter 0 = toggles selection ADF1 - ADF2
* Lua NpCsetADF + parameter 1 = ADF1 only selection
* Lua NpCsetADF + parameter 2 = ADF2 only selection

* Lua NpCsetIAS + parameter 0=toggles selection Knots - MACH
* Lua NpCsetIAS+ parameter1= Knots only selection
* Lua NpCsetIAS + parameter 2= MACH only selection

* Lua NpCsetOBS + parameter 0 = toggle selection OBS1  OBS2*
* Lua NpCsetOBS + parameter 1 = OBS1 only selection*
* Lua NpCset OBS + parameter 2 = OBS 2 only selection*

* Lua NpCsetNAV&OBS + parameter 0 =toggle selection NAV1-OBS1-NAV2-OBS2*
* Lua NpCsetNAV&OBS + parameter 1 = toggle selection NAV1-OBS1*
* Lua NpCsetNAV&OBS + parameter 2 = toggle selection NAV2-OBS2*

* NpCsetCherAP +parameters:  20 for AP Mode Select, 21 for Altitude Hold toggle, and 22 for AP Disconnect.


*Or CRS if Lua NpCsetCRS or Lua NpCsetNAV&CRS are used instead of the OBS scripts



There's only one transponder and one autopilot, so no toggle with these devices.  For the Lua NpCsetSQK control you can simply set the parameter to 1 (default value), and similarly, you can use a default parameter value of 1 for the autopilot script NpCsetAP.   Actually, except for the NpCkeyData script discussed below, for all other NpC scripts not specifically mentioned in the parameter table above a default parameter value of 0 will work.

Setting the Digits and Decimal Point

Now to assign the numpad keystrokes, including the 0, 1, 2,... 9 digits and the decimal point that are needed to type in the radio frequencies or transponder squawk codes:

All those will use the control "Lua NpCkeyData" in step 2, but we need to assign the right parameter to each digit in step 3 (make sure the numberpad Num Lock is on):

digit 0  -->  parameter = 0
digit 1  -->  parameter = 1
digit 2  -->  parameter = 2
digit 3  -->  parameter = 3
digit  4 -->  parameter = 4
digit 5  -->  parameter = 5

digit 6  -->  parameter = 6
digit 7  -->  parameter = 7
digit 8  -->  parameter = 8
digit 9  -->  parameter = 9
decimal point  -->  parameter = 10

Here's an example for the fifth digit, with the parameter set to 5  the number pad 5 key is pushed after clicking the Set button in step 1, Lua NpCkeyData is used in step 2 as the Control sent when key pressed and the parameter 5 is entered in step 3.  Click Confirm and verify the configuration was entered properly.




It may seem that this is an unnecessary step as the numberpad should send numbers directly to the program.  This is not the case.  Each number key must be programmed as above, along with the decimal point key.

Following the same process as demonstrated above, configure NpC keys for Frequency Swap, Backspace,  Aircraft Menu On, Reset, and Vertical Speed Up and Down entering the appropriate parameter for each of the functions at Step 3 as shown in the table below.  Remember not to use the same key for more than one assignment:


NpCkeyData Function
FSUIPC4 Parameter
Number pad digits 0-9
 0-9 respectively      
Number pad Decimal Point
       10
Exchange Com, Nav or ADF Standby frequency (frequency  Swap)
       11
Backspace (one digit or decimal point place)
       12
Aircraft Selection Menu
       13
Reset to first digit position (cancel all previous inputs)
       14
Vertical Speed Up
       15
Vertical Speed Down
       16
NpC Configuration Options

There are optional LUA scripts included in NpC.zip that provide the user with some configuration flexibility. With flexibility, of course, comes the increased possibility of screwing things up so take extra care not to assign the same key to more than one function or use a key that is configured in the FSX Buttons/Keys controls assignment panel for some other FSX function.

Autopilot Option

The standard script NpCsetAP.lua allows the user to assign a single key (or key combination) to access the three autopilot functions - altitude (ALT), vertical speed (VS), and heading (HDG). The assigned key operates as a 3-way toggle; each push of the key cycles to the next autopilot function in the order ALT, VS, HDG, and then back to ALT.
  
As an option, the user may use one or more of the three individual autopilot scripts 
NpCsetALT.lua,   NpCsetVS.lua, and   NpCsetHDG.lua  in place of NpCsetAP.lua  to set the autopilot ALTitude, Vertical Speed, or HeaDinG, respectively. The cost of using these three separate scripts is that each one requires the assignment of a unique access key (and the ability to remember which key does what!).  The advantage is you do not have to cycle through the autopilot functions to get to the one you want, and the ALTitude and Vertical Speed scripts can also do double  duty with the A2A Cherokee AP as discussed  below.

One could even use all four autopilot scripts at the same time (although why you would want to do this escapes us) PROVIDED each script is activated (selected) by a unique key.  Using both the standard and optional individual scripts you would have 4 keys to remember (a challenge we dont relish at our age , hence the use of the stick-on labels in the second example key assignment set presented below) and 4 keys you need to verify do not conflict with other functions assigned in FSX.

Cherokee AP Option

The somewhat unique Cherokee autopilot requires 3 keys for operation: AP Disconnect key, AP Altitude Hold toggle on/off key, and an AP Mode select multi-toggle key. Thus to use the NpCsetCherAP script, three keys must be assigned to the script , each with the appropriate parameter value for each of the three functions.   As an option, if the user has chosen to use the three NpC scripts NpCset VS, NpCsetALT and NpCsetIAS for use with other aircraft, the keys used for these three scripts will automatically (without any user key assignments) operate the Cherokee AP Disconnect switch, Altitude Hold toggle, and Mode toggle, respectively,  when the Cherokee is selected via the NpC aircraft selection menu. In this case, the NpCsetCherAP script need not be used at all, thus saving three key assignments.

Nav Radio and OBS / CRS Option 

The script NpCsetNav&OBS.lua allows the user to assign a single key (or key combination) to select either Nav1or Nav2 (to enter frequencies), or OBS1 or OBS2 (to select a VOR radial or turn the HSI cursor to a specific VOR radial or the actual runway magnetic heading for a localizer approach). The assigned key operates as a 4-way toggle; each push of the key cycles to the next one of the 4 devices in the order of NAV1, OBS1, NAV2, OBS2, and then back to NAV1. The thought here (if we can glorify it as such) was that if the user has just set a new frequency into say, NAV1, she may next want to set OBS1, so that becomes available as the next step in the toggle function, etc.
Here again there is the option to use both the standard scripts (NpCset Nav.lua and NpCsetOBS.lua) and the optional NpCsetNav&OBS.lua script.  Using the separate scripts from the basic set selecting the Nav radios and the OBSs requires the use of two separate and unique keys. Each key acts as a 2-way toggle (NAV1/NAV2 and OBS1/OBS2, respectively - assuming you have two Nav radios and two OBSs, of course). Similar to the above autopilot option, you could use all three Nav and OBS scripts at the same time PROVIDED you assigned three unique access keys. Here too we wont hazard a reason why it would be advantageous to do this, especially given the difficulty of finding convenient and available keys in FSX. However, to each his own and it will work if you choose to use both the basic scripts and the optional scripts together.
The NpCset CRS.lua and NpCsetNAV&CRS.lua scripts only differ from the NpCsetOBS.lua and NpCsetNAV&OBS.lua scripts, respectively, in that the former scripts will display CRS1 or CRS2 vs. displaying OBS1 or OBS2 on the green title bar. This simply provides an option for those who prefer to think in terms of Course vs. OBS settings.  One could also choose to implement both Course and OBS options and then use what best fits the aircraft being flown. For example, using the OBS scripts with the C172 and the Course scripts with the B737. This is strictly a personal preference issue.


NpCsetNav or GPS Option

This script simply allows the user to assign a key or key combination to toggle aircraft navigation between NAV and GPS. This is useful if, like in the default FSX Baron 58, the Virtual Cockpit does not provide a switch for this function (it is only on the Barons 2D panel).
NpC Operation

Selecting Aircraft Type

Aircraft Selection Menu

In order to better support some payware aircraft, the function of the previous NpC On/Off key has been modified in this versin of NpC.  Now, instead of toggling between On and Off, the key activates the Aircraft Selection Menu. The selection menu, which appears in white type (requires a current version of FSUIPC4, or red type otherwise) in the upper left corner of the screen (see below), allows the NpC user to choose between FSX Default  (or equivalent) aircraft, the A2A Cherokee 180,  the Flight1 King Air B200, the PMDG B737NGX, or the PMDG B777. Or, to turn NpC off, to enter an *.  Upon startup, NpC is in the Default FSX aircraft mode, so using the selection menu is not required if initially a default FSX aircraft, or a third party aircraft not specifically listed in the menu, is to be used. Note third party aircraft not specifically listed may work with NpC to some degree. For example, the A2A C172 radios, heading, and course setting functions work with NpC, but setting the autopilot altitude and VS do not. Same for the Milviz Cessna 310R.  The only way to know in such cases is to try it.  

So to use the aircraft selection menu:

Type in the number or * corresponding to your desired selection  then hit the <Enter> key.
1. FSX Default and Add-on A/C
2. A2A Cherokee 180
3. FLIGHT1 KA B200
4. PMDG B737 NGX
5. PMDG B777
 *  NpC Off

 
Note again that NpC defaults to selection 1  FSX Default and Standard Add-on A/C  at start-up  (standard add-on a/c refers to third party a/c that were developed within default FSX a/c programming guidelines, but as mentioned above, you can give any a/c a try ).

Remember to hit <Enter> after you make you selection.  Note that the menu number or * selection can be entered from either the number pad on your keyboard or by using the number keys across the top row of your keyboard.

If you enter an * you will turn NpC off and see in the center of the top of the screen:

Hitting that Menu key again will bring up the Aircraft Selection menu.




There is an option under the FSUIPC Miscellaneous Tab to have non-scrolling messages written on the green bar appear in white letters instead of red if so preferred.  


Typical Radio Selection

Once an aircraft is selected and loaded, press the COM selection key to toggle between COM1 and COM2.   For COM1 you will see at the top center of the screen:



Press again you will see COM2 as the active device 



Again, you will see that the numbers are displayed in the device frequency window as you enter them after selecting a radio or transponder.

There's no need to use the decimal point, NpC will add it automatically, but you can enter it if you choose to.  You must however enter all required digits (see the Required Entries for Each Device section below) to ensure that the input is entered properly.

For Com and Nav devices, once the required digits are entered you can swap the entered value (the frequency entered will be in the standby spot for Coms and Navs) by pressing the Swap key that you programmed to make the entered value the active frequency. 

The Reset key can be used to restart typing a frequency, transponder code, altitude, vertical speed, autopilot heading or OBS/CRS value from the beginning if a mistake is made.  The Backspace key can be used to move back one or more digits or decimal point places (one for each keypress) to replace an entry from a specific point, leaving the previous entries in that string unchanged.

Pressing the Menu key will bring up the aircraft menu, and if an * is entered a message will be displayed informing that NpC is OFF. All key presses will be ignored while NpC is off, except for the Menu key, of course.







Required Entries for Each Device

In order to ensure a proper entry you should follow the recommendations below.  You may get an entry (or maybe not) but to ensure you do, enter as specified: 

RADIOS/TRANSPONDER:

* COMs  5 digits, with optional decimal point.  For aircraft with 6 digit frequency displays (3 decimal digits) FSX will fill in the sixth digit automatically (a 0 or 5) when the fifth digit is entered. Do NOT enter the sixth digit manually or an Invalid Entry error message will result.
* NAVs  5 digits with optional decimal point.  For aircraft with 6 digit frequency displays (3 decimal digits) FSX will fill in the sixth digit automatically (a zero) when the fifth digit is entered. Do NOT enter the sixth digit manually or an Invalid Entry error message will result.
* ADF- 5 digits,  use a leading zero for frequencies below 999.9 KHz. 
* Transponder SQK -4 digits required.  A zero is considered part of the code so if the code begins with zero it must be entered.

AUTOPILOT:

* ALTitude set  5 digits (use a leading zero for altitudes below 10,000 feet)  note that the last two digits must be zeros 00  the smallest increment for altitude entry is 100 feet.  Also note that altitude (and vertical speed) entries do not appear in the display until all required values are entered.
* Vertical Speed set  The entry must be preceded by the plus/up or minus/down key (the ones programmed using the "Lua NpCKeyData" control, and parameter = 15 (for plus/up), and parameter = 16 (for minus/down).  THEN  four more digits are required  leading zero for vertical speed less than 1000 FPM.  Last 2 digits must be zeros 00  the smallest increment for vertical speed entry is + or - 100 feet.
* HeaDinG  3 digits  leading zero(s) for headings less than 100 degrees.

AIRSPEED
* Airspeed (IAS) in Knots   always 3 digits (leading 0 if necessary),  max entry is 990 (FSX property)
* Airspeed (IAS) in MACH  always  3 digits with a decimal point (leading 0 if necessary),  max entry is 1.64 Mach.
* No Auto-throttle?  Nothing happens

OBS, OMNI BEARING SELECTOR:

* OBS course  3 digits  leading zero(s) for headings less than 100 degrees.
* Note that OBS1 may point to an HSI, PFD or other instrument cursor  this is the device that will change
* No NAV2/OBS2?  Nothing happens

IMPORTANT:  If you find that the device is not responding to your number pad input as it should, enter the digits a bit more slowly.  This may be an issue for certain users systems or aircraft so be aware that entering digits too quickly could be a problem. 

Invalid entries are where the frequency, code, course or heading does not exist (e.g., a 440 degree heading or a Nav frequency ending with a second decimal value of 6  like 112.56).  If you make an invalid entry you will see:

Valid NpC Entries

Device
                                             Valid NpC Data Entries
COM
118.00 to 136.97 MHz in 0.025MHz steps, 2nd (last entered) decimal digit is 0, 2, 5, or 7.  For displays with a 6th digit (3 decimal digits), this will be entered automatically.
NAV
108.00 to 117.95 MHz in 0.05MHz steps, last decimal digit must be either 0 or 5.    For displays with a 6th digit (3 decimal digits), this will be entered automatically.
ADF
0190.0 to 1799.5 KHz
Transponder, SQK
0000 to 7777 but note SQK codes only use digits from 0 to 7 (no 8s or 9s)
Airspeed, IAS
000 to 990 knots;  0.00 to 1.64 MACH
OBS/CRS
000 to 360 (note the use of leading zeros when required)
AutoPilot  

     ALTitude
00100 to 99900 feet in 100 foot increments  the last 2 digits must be 00
     Vertical Speed
up (+) or down (-) key, then 0100 to 9900 in 100 ft/min increments  last 2 digits must 00
     HeaDinG
000 to 360 (note the use of leading zeros when required)
DUMMY DIGITS:  If you are making an entry where the initial digits would temporarily result in an invalid entry you will see a temporary dummy digit appear to avoid an invalid entry that FSX will not accept   for example:

COM1 is currently set at 128.50.  You want to enter a new frequency, 133.25  but entering the first two digits 1 and 3 would (at that point, since you have not entered the third digit) give an invalid frequency (138.50)  so a dummy digit (in this case a zero) will automatically appear in the third digit spot (at this point you will see 130.50) until you enter the final three digits  which progressively replace the zero, 5 and second zero in the remaining string to give 133.25.

Standby / Swap key moves the frequency entereed into a NAV or COM radio from the standby position (where the entered frequency appears) to the active position, and vice versa.

The Backspace key moves you back one space (or decimal point) from your current position each time you press it   so if you enter 121.5 but at that point wanted 120.50 you would need to press this three times  to move you back to the second 1 in the string, then type 0.50 to get the correct entry.

The Reset key moves you back to the beginning of the entry.  So, in the example used for the Backspace key above, if you hit the reset key after entering 121.5 you would start from the beginning to get the correct entry, entering all five digits (and optionally, the decimal point), 120.50.

Assigning Keys

This is very much a personal preference thing but there are two important rules to keep in mind:

1. A given key can only be assigned once for a device selection (COM, NAV, XPDR, ADF, AP, etc), an action (Frequency swap, NpC Menu on) or an entry (numeric value, decimal point, backspace, reset and vertical speed up/+ and down/ - ).  In other words, a given key can only be associated with a single LUA script (some scripts may have several associated keys).
2. You MUST verify that there are no conflicting assignments in the FSX Buttons/Keys settings (in Options | Settings | Controls accessed from the menu bar at the top of the FSX screen).    Below are a couple of key assignment sets used by the script testers  you can use one of these or some modification on these themes, or make your own key assignments  whatever suits you best.  The idea behind the first set below is, to the extent possible, to make key assignments whose name relates to the associated function, for example, C for COM radios, N for NAV radios, etc. The idea behind the second set is to pick keys whose physical location on the keyboard and number pad allows for convenient groupings or layout patterns.  Keys used for NpC are trapped by FSUIPC and not available for other FSX functions.

Note the term key can refer to a single key, or what is really a key combination, such as Shift + F1. Often special keyboard keys, like the Calculator or Favorites key, can be used effectively with NpC. Some keyboards have a Hot Key re-assignment utility that can be useful in this regard.




Example 1 - Key Assignments 

Device Selection Keys
Input and Action Keys
* C - COM     
* N - NAV&OBS (if using a single key for Nav and OBS selection)
* ADF - F
* T - Transponder
* Shift + F1  - Autopilot 
* Pause  -  IAS, Airspeed
* O  - OBS  (if using separate Nav and OBS selection keys)

* X - Swap or eXchange Standby/ Active Nav or Com frequencies
* Numpad *  (asterisk on the number pad) -  NpC  Menu On   
* Backspace key  Backspace function in the entry script
* Numpad /  (forward slash on the number pad) - Reset function to restart the entry from the beginning
* Numpad number and decimal point keys (the logical keys to be used for number and decimal entry)
* Num+  (+ sign on numpad) Vertical Speed up
* Num-   (- sign on numpad)  Vertical Speed down





Example 2 - Key Assignments 

As described earlier, the version below was used on a keyboard where the Insert, Delete, Home, End, Page Up and Page Down keys were clustered in a group of six.  The keys were then labelled to identify the device they activate since you can see that the logical C for COMs, N for NAVs, etc, is not used.  Please note that if the Num Lock key is not in the Number mode certain number pad keys will also perform these functions so be careful to ensure you have Num Lock on before you make a numeric entry.

Device Selection Keys
Input and Action Keys
* Page Up - Com     
* Page Down - Nav (OBS is separate in this setup but could be used)
* ADF - End
* Home - Transponder
* Delete  - Autopilot 
* Insert  - OBS  (using separate Nav and OBS selection keys in this case)

* Numpad Enter key (the enter key associated with the number pad)  - Swap Standby/ Active Nav or Com frequencies
* Numpad *  (asterisk on the number pad) - Vertical speed direction negative (down)   
* Numpad /  (forward slash on the number pad) - Vertical speed direction positive (up)
* Backspace key  Backspace function in the entry script
* Numpad - (minus key on the number pad) Reset function to restart the entry from the beginning
* Backspace key  Backspace function in the entry script
* The  ~ `  key (just left of the 1 key in the horizontal number keys across the top of the keyboard) ) -  NpC Menu on
* Numpad number and decimal point keys (the logical keys to be used for number and decimal entry)



The key labeled ALT INCR is not part of the NpC  this is a separate key programmed through FSUIPC along with others on the part of the keyboard not in this picture.
Resizing and Repositioning the NpC Message Window

NpC messages initially appear on the left side of a green bar which appears across the entire top of the monitor screen. It turns out, however, the green bar is actually a window that can be undocked, moved and resized to the users preference. Since most NpC messages only appear for a few seconds, it can be a bit challenging to grab the bar and adjust it before it disappears. However, if the NpC aircraft selection menu is activated, the menu and green bar remain on the screen until the users provides an a/c selection input. So the recommended procedure for adjusting the green bar is:

- Activate the NpC a/c selection menu.
- Position the mouse cursor over the left or right edge of the green bar so that a double arrow appears.
- Right click and hold so that the green bar/window becomes outlined in white. You can now adjust the width of the bar with the mouse.
- When the desired width is obtained (note both sides of the bar can be adjusted) release the mouse.
- Now right click inside the green bar and drag it where you want it on the screen.
- Finally, enter the desired a/c selection menu value followed by the Enter key.
- This process must be repeated each time you start FSX. However, after doing it a few times you will find the whole process takes just a few seconds.

Notes

Actions like squawk ident, COM1/2 select (as the active radio for transmitting) NAV and marker beacon ID codes audible on/off, etc.. are not covered here.  But if you own a FSUIPC4 license it should be no problem for you assigning keystrokes or buttons to those things directly through existing FSUIPC functions.

Dazz said in the original version The code sucks ass, I know. I just started adding stuff and it ended up being a complete mess. I may group things in functions, rename the variables and add comments someday, or maybe not.  WELL  we will have to disagree with that!  It was a wonderful tool as-built and one that pointed the way (in the right direction!) to improvements.

We are not experienced programmers, so use NpC and abuse it at will (or improve it!), but don't blame anyone if something goes wrong. There's no reason why anything bad should happen and we havent had any problems in this regard, but be prudent and make sure you back up your Modules folder prior to installing NpC, and also make sure there are no key conflicts with your FSUIPC and FSX assignments. 

SEE THE NEXT PAGE FOR A SUMMARY OF NpC PARAMETERS  This is also found in the separate document NpC Data & Param Quick Reference

Again, thanks to dazz (Dario Iriberri) for getting the whole concept started.

Al Klayton  - amateur programmer unencumbered by experience or training
Dan Sullivan  Napoleans corporal (Google if you dont get it!)

Last Updated:  December 04, 2015 -  08:10 
Created:  November 5, 2013

NpCv2.21 Quick Reference
Device
Valid NpC Data Entries
COM
118.00 to 136.97 MHz in 0.025MHz steps, 2nd (last entered) decimal digit is 0, 2, 5, or 7
For displays with a 6th digit (3 decimal digits), this will be entered automatically
NAV
108.00 to 117.95 MHz in 0.05MHz steps, last decimal digit must be either 0 or 5
 For displays with a 6th digit (3 decimal digits), this will be entered automatically
ADF
0190.0 to 1799.5 KHz
Transponder, SQK
0000 to 7777 but SQK codes only use digits from 0 to 7 (no 8s or 9s)
Airspeed, IAS
000 to 990 knots;  0.00 to 1.64 MACH
OBS/CRS
000 to 360
AutoPilot  

     ALTitude
00100 to 99900 feet in 100 foot increments, i.e., last 2 digits must be 00
     Vertical Speed
up or down key, 0100 to 9900 in 100 ft/min increments, i.e., last 2 digits must be 00
     HeaDinG
000 to 360
NpCkeyData Function
FSUIPC4 Parameter
Number pad digits 0-9
 0-9 respectively
Numbr pad Decimal Point
       10
Exchange Com or Nav Standby frequency 
       11
Backspace (one digit or decimal pt place)
       12
Aircraft Selection Menu on
       13
Reset to first digit position
       14
Vertical Speed UP
       15
Vertical Speed Down
       16
      Avionics  Function
Possible FSUIPC4 Parameter Values
NpCsetCOM
0, 1, 2
NpCsetNAV
0, 1, 2
NpCsetNAV&OBS  (or NpCsetNAV&CRS)
0, 1, 2
NpCsetADF
0, 1, 2
NpCset IAS
0, 1, 2
NpCsetOBS   (orNpCsetCRS)
0, 1, 2
NpCsetSQK
0 (not used)
NpCsetAP
0 (not used)
NpCsetALT
0 (not used)
NpCsetVS
0 (not used)
NpCsetHDG
0 (not used)
NpCsetCherAP
20, 21, 22
NpCsetNAVorGPS
0 (not used)NpC v2.21 for FSX0Page 1


NpC v2.21 for FSX0Page 15


Contact Information

Dan 'TXHills' - txhills-fsx@att.net